module.exports = {
  random(min, max) {
    return random(min, max);
  },
  sleep(start, end) {
    var duration = this.random(start, end);
    this.sleep$(duration);
    return duration;
  },
  sleep$(duration) {
    sleep(duration * 1000);
  },
  possible(start, end, scale) {
    var scale = scale || 100;
    var v = this.random(1, scale);
    return v >= start && v <= end;
  },
  hasExec(startTime) {
    var now = Date.now();
    return parseInt((now - startTime) / 1000);
  },
  getMin(v) {
    return v / 60;
  },
};
